package com.example.md.mddemo.easypoi;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Field;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * Copyright © 2018年 ziniuxiaozhu. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * TODO:亲爱的临江仙，请写点注释吧...........
 * @Date 2018/8/20 16:12
 */
public class ExeclCustomer {

    @Id
    private ObjectId id;

    @Field(value = "cust_code")
    private String custCode;

    @Field(value = "company_code")
    private String companyCode;

    @NotNull(message = "客户姓名不能为空！")
    @Excel(name = "客户姓名",needMerge = true)
    @Field(value = "cust_name")
    private String custName;

    @NotNull(message = "客户类型不能为空！")
    @Excel(name = "客户类型",needMerge = true)
    @Field(value = "cust_type")
    private String custType;

    @NotNull(message = "客户等级不能为空！")
    @Excel(name = "客户等级名称",needMerge = true, width = 12)
    @Field(value = "cust_grade_name")
    private String custGradeName;

    @NotNull(message = "到期时间不能为空！")
    @Excel(name = "到期时间",needMerge = true)
    @Field(value = "balance_date")
    private String balanceDate;

    private Long receivables;

    @NotNull(message = "法人代表不能为空！")
    @Excel(name = "法人代表",needMerge = true)
    @Field(value = "legal_person")
    private String legalPerson;

    @NotNull(message = "纳税人识别号不能为空！")
    @Excel(name = "纳税人识别号", width = 12,needMerge = true)
    private String identification;

    @Field(value = "user_id")
    private String userId;

    @Excel(name = "负责人",needMerge = true)
    @Field(value = "user_name")
    private String userName;

    @Excel(name = "备注",needMerge = true)
    private String remark;

    @Excel(name = "创建时间", format = "yyyy-MM-dd", width = 18,needMerge = true)
    @Field(value = "gmt_create")
    private Date gmtCreate;

    @Field(value = "gmt_modified")
    private Date gmtModified;

    @ExcelCollection(name = "客户地址信息")
    @Field(value = "address_list")
    private List<ExeclAddress> addressList;

    @ExcelCollection(name = "银行列表信息")
    @Field(value = "bank_info_list")
    private List<ExeclCustBankAcctInfo> bankInfoList;

    private Integer status;

    @ExcelCollection(name = "联系人地址信息")
    @Field(value = "contact_list")
    private List<ExeclCustContactPerson> contactList;


    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public String getCustCode() {
        return custCode;
    }

    public void setCustCode(String custCode) {
        this.custCode = custCode;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getCustName() {
        return custName;
    }

    public void setCustName(String custName) {
        this.custName = custName;
    }

    public String getCustType() {
        return custType;
    }

    public void setCustType(String custType) {
        this.custType = custType;
    }

    public String getCustGradeName() {
        return custGradeName;
    }

    public void setCustGradeName(String custGradeName) {
        this.custGradeName = custGradeName;
    }

    public String getBalanceDate() {
        return balanceDate;
    }

    public void setBalanceDate(String balanceDate) {
        this.balanceDate = balanceDate;
    }

    public Long getReceivables() {
        return receivables;
    }

    public void setReceivables(Long receivables) {
        this.receivables = receivables;
    }

    public String getLegalPerson() {
        return legalPerson;
    }

    public void setLegalPerson(String legalPerson) {
        this.legalPerson = legalPerson;
    }

    public String getIdentification() {
        return identification;
    }

    public void setIdentification(String identification) {
        this.identification = identification;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public List<ExeclAddress> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<ExeclAddress> addressList) {
        this.addressList = addressList;
    }

    public List<ExeclCustBankAcctInfo> getBankInfoList() {
        return bankInfoList;
    }

    public void setBankInfoList(List<ExeclCustBankAcctInfo> bankInfoList) {
        this.bankInfoList = bankInfoList;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public List<ExeclCustContactPerson> getContactList() {
        return contactList;
    }

    public void setContactList(List<ExeclCustContactPerson> contactList) {
        this.contactList = contactList;
    }
}
